package com.cbgolf.oa.activity.parkdetails;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.cbgolf.oa.R;
import com.cbgolf.oa.base.BaseActivity;
import com.cbgolf.oa.model.FairwayModel;
import com.cbgolf.oa.views.FairwayView;

/**
 *
 * @author lq
 * @date 2017/8/31
 */

public class FairwayActivity extends BaseActivity implements FairwayView.IFairwayPresenter {

  private FairwayView view;
  private FairwayModel model;

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.a_parkway_details);
  }

  @Override
  protected void findViews() {
    view = new FairwayView(this,this);
    model = new FairwayModel(this);
  }

  @Override
  public String getActivityTitle() {
    return "球场管理";
  }

  @Override
  public void back() {
    finish();
  }

  @Override
  public void showProgress() {
    view.showProgress();
  }

  @Override
  public void stopProgress() {
    view.stopProgress();
  }

  @Override
  public void getDataFail(String msg) {
    view.getDataFail(msg);
  }

  @Override
  public void getDataSuccess(Object obj) {
    view.getDataSuccess(obj);
  }

  @Override
  public void getDataFail(String msg, int code) {
    view.getDataFail(msg, code);
  }

  @Override
  public void getData() {
    model.getData();
  }
}
